package com.buytouch.mobile.seller.mng.user;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserServiceImpl implements UserService{
	
//	@Resource
//	private UserDao userDao;
	
	@Autowired
	private SqlSession sqlSession;

	@Override
	public String get_test() {
		UserDao userDao = sqlSession.getMapper(UserDao.class);
		String test = "";
			test = userDao.get_test();
		return test;
	}

	@Override
	@Transactional(propagation=Propagation.REQUIRED)
	public void insert_test() {
		UserDao userDao = sqlSession.getMapper(UserDao.class);
		String test = "";
			userDao.intsert_test();
			userDao.intsert_test2();
		}

	@Override
	public void insert_mng_join(Map map) {
		UserDao userDao = sqlSession.getMapper(UserDao.class);
		userDao.insert_mng_join(map);
		
	}

	@Override
	public List item_check_request() {
		UserDao userDao = sqlSession.getMapper(UserDao.class);
		return userDao.item_check_request();
	}

	@Override
	public List item_check_request_cate_nm(String store_id) {
		UserDao userDao = sqlSession.getMapper(UserDao.class);
		return userDao.item_check_request_cate_nm(store_id);
	}

	@Override
	public List item_check_request_item_list(String store_id, String code_cate) {
		UserDao userDao = sqlSession.getMapper(UserDao.class);
		return userDao.item_check_request_item_list(store_id,  code_cate);
	}
}
